 #define _CRT_SECURE_NO_WARNINGS 2

#include"RBtree.h"
#include<time.h>

void test_RBtree() {
	RBtree<int, int> root;
	int count = 1000000;
	srand(time(0));
	for (int i = 0; i < count; ++i) {
		int e = rand();
		root.Insert(make_pair(e,e));
	}
	cout << root.IsBalance() << endl;
}

void test1() {
	int a[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };
	RBtree<int, int> root;
	for (auto& e : a) {
		root.Insert({ e,e });
		if (root.IsBalance())
			cout << "Insert:" << e << "->" << "IsBalance" << endl;
	}
	//root.InOrder();
}

int main() {
	test_RBtree();
	//test1();
	return 0;
}